package com.pig4cloud.pig.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.core.util.R;
import com.pig4cloud.pig.customer.vo.TrCustomer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CustomerMapper extends BaseMapper<TrCustomer> {
	R addCustomer(TrCustomer customer);
    Page<TrCustomer> pageCustomers(Page<TrCustomer> page, @Param("trCustomer") TrCustomer trCustomer);
	// 根据ID查询（带统计）
	TrCustomer selectByIdWithCount(@Param("cusId") Long cusId);

	boolean existsByCusTel(String cusTel1);
}
